DEF_PROJECT=../../..
include $(DEF_PROJECT)/scripts/main.mk
name=bash
version=4.2
prefix=/usr
patch=bash-4.2-p37.patch
destdir=$(DIR_SYSROOT)
extdeps=eglibc-tools gcc-tools binutils-tools linux-header-tools

DL_SERV=http
DL_HOST=ftp.gnu.org
DL_PATH=gnu/$(name)
DL_SUFFIX=tar.gz

cflags+=--host=$(CC_TARGET)
cflags+=--build=$(CC_HOST)
cflags+=--with-sysroot=$(DIR_SYSROOT)
cflags+=--cache-file=config.cache
cflags+=--without-bash-malloc
cflags+=--with-installed-readline
cflags+=--bindir=/bin

iflags+=htmldir=/usr/share/doc/bash-4.0

pre-build:
	echo ac_cv_func_mmap_fixed_mapped=yes >$(source)/$(DEF_CACHE)
	echo ac_cv_func_strcoll_works=yes >>$(source)/$(DEF_CACHE)
	echo ac_cv_func_working_mktime=yes >>$(source)/$(DEF_CACHE)
	echo bash_cv_func_sigsetjmp=present >>$(source)/$(DEF_CACHE)
	echo bash_cv_getcwd_malloc=yes >>$(source)/$(DEF_CACHE)
	echo bash_cv_job_control_missing=present >>$(source)/$(DEF_CACHE)
	echo bash_cv_printf_a_format=yes >>$(source)/$(DEF_CACHE)
	echo bash_cv_sys_named_pipes=present >>$(source)/$(DEF_CACHE)
	echo bash_cv_ulimit_maxfds=yes >>$(source)/$(DEF_CACHE)
	echo bash_cv_under_sys_siglist=yes >>$(source)/$(DEF_CACHE)
	echo bash_cv_unusable_rtsigs=no >>$(source)/$(DEF_CACHE)
	echo gt_cv_int_divbyzero_sigfpe=yes >>$(source)/$(DEF_CACHE)
	cd $<;$(cdefs) ./configure $(cflags)
